#include "CScrollTextDiscriptor.h"

CScrollTextDiscriptor::CScrollTextDiscriptor(void)
:IDescriptorData(DESCRIPTOR_TAG_SCROLL_TEXT) 
, m_nSpeed(0) 
, m_nBackColor(0)
, m_nFontColor(0)
, m_nScrollType(0) 
{
}

CScrollTextDiscriptor::~CScrollTextDiscriptor(void)
{
}



void CScrollTextDiscriptor::GetData(BYTE* buff  , int &len)
{
	CBuffer stBuffer(buff, DESCRIPTOR_MAXLEN);

	PACK_DESCRIPTOR_BUFFER_START(stBuffer, DESCRIPTOR_TAG_SCROLL_TEXT);

	stBuffer.Write((WORD)m_nSpeed);
	stBuffer.Write((DWORD)m_nBackColor);
	stBuffer.Write((DWORD)m_nFontColor);
	stBuffer.Write((BYTE)m_nScrollType);
	 
	len = PACK_DESCRIPTOR_BUFFER_END(stBuffer);
}